package com.hzlh.common.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {

	/**
	 * 
	 * @param filename 文件名
	 * @param propertyKey 属性名
	 * @return
	 */
	public static String getProperties(String filename,String propertyKey){
		String propertyValue = "";
		Properties jms=new Properties();
		InputStream in = PropertiesUtil.class.getClassLoader().getResourceAsStream(filename);
		try {
			jms.load(in);
			propertyValue=jms.getProperty(propertyKey);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return propertyValue;
	}
}
